package com.lzh.excel.exception;

/**
 * @author zhehen.lu
 * @date 2025/8/3 14:27
 */
public class ExcelException extends RuntimeException {
    private Integer errorCode;
    private String errorMsg;

    public ExcelException(Integer errorCode, String errorMsg) {
        this.errorMsg = errorMsg;
        this.errorCode = errorCode;
    }

    public ExcelException(ErrorCode errorCode) {
        this.errorMsg = errorCode.getErrorMsg();
        this.errorCode = errorCode.getErrorCode();
    }

    public Integer getErrorCode() {
        return this.errorCode;
    }

    public String getErrorMsg() {
        return this.errorMsg;
    }
}
